#!/usr/bin/env python3
# coding:utf-8

file = open('sketch.txt','r')
for each_line in file:
    if each_line.find(':') != -1:                                    # 判断每一行的句子中是否含有‘：’
        (name, line) = each_line.split(':', 1)
        #print(name, 'said:', line, end='')
        print('{0: >10} said:{1}'.format(name, line), end='')        # 向右对齐10个字符的宽度
    else:
        print(('{:>20}').format(each_line), end='')
file.close()
